home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cpptutor.arc / SCHEDULE.HPP < prev    next >
Text File  |  1991-04-28  |  1KB  |  41 lines

  1. // This takes care of all gate assignments and flight scheduling.
  2. // The players flight is shuffled (changed) each move until he reads 
  3. // his ticket.  If he gets to the proper gate prior to reading the
  4. // monitor in the waiting area, (reading the monitor at the ticket
  5. // counter doesn't matter), the gates are rescheduled.
  6. //
  7. // The method named check_flight does all of the required checking
  8. // to see that everything was done properly prior to getting on
  9. // the plane.  It only does checking if the player is on one of the
  10. // planes.
  11.  
  12. #ifndef SCHEDULEHPP
  13. #define SCHEDULEHPP
  14.  
  15. #include "flyaway.h"
  16. #include "location.hpp"
  17.  
  18. class schedule {             // There are four flights [0] to [3],
  19.    location *gate[4];        // Gate names
  20.    int flight_number[4];
  21.    char *destination[4];
  22.    int depart_hour[4];
  23.    int depart_minute[4];
  24.    int flights_frozen;       // Frozen after monitor is read in the
  25.                              //  waiting area
  26.    int gates_frozen;         // Frozen after ticket is read
  27.    int my_gate;
  28. public:
  29.    schedule(void);
  30.    void shuffle_flights(void);
  31.    void shuffle_gates(location *current_location);
  32.    void list_flights(location *current_location);
  33.    void gate_message(location *current_location);
  34.    void list_actual_destination(void);
  35.    void list_time(int index);
  36.    void check_flight(location *current_location);
  37. };
  38.  
  39. #endif
  40.  
  41.